package com.SuanFa.ZuoChengYun;

import java.util.Scanner;

public class a6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //在此输入您的代码...
        int s=0;
        for (int j = 1; j < 99; j++) {
            int sum = j*j*j;
            int temp=changeSum(sum);
            if (j==temp){
                s+=1;
            }
        }
        System.out.println(s);
        sc.close();
    }

    private static int changeSum(int sum) {
        String str = String.valueOf(sum);
        int m = 0 ;
        for (int i = 0; i < str.length(); i++) {
            int i1 = str.charAt(i) - '0';
            m+=i1;
        }
        return m;
    }
}
